/**
 * Created by DELL on 2017/6/27.
 */
/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @xyj
 */

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
    ScrollView,
} from 'react-native';
import BaseComponent,{base} from '../../base/Base'
import Swiper from 'react-native-swiper';

export default class  SwiperPage extends BaseComponent {


    renderImg(){
        var imageViews=[];
        for(var i=0;i<10;i++){
            imageViews.push(
                <Text
                    key={i}
                    style={{flex:1}}
                >我是当前的页面   {i}</Text>
            );
        }
        return imageViews;
    }
    render() {
    return (
        <ScrollView>

            <View style={{height:250,backgroundColor:'#0f0'}}/>
            <Swiper height={200}
                    loop={true}
                // showsButtons={true}
                    index={0}
                    autoplay={true}
                    horizontal={true}
            >
                {this.renderImg()}
            </Swiper>
        </ScrollView>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});